﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>用户修改</title>
    <script src="../../Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <link href="../../Content/Themes/blue2/css.css" rel="stylesheet" type="text/css" />
    <script src="<%=Url.Content("~/Content/My97DatePicker/WdatePicker.js") %>" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
   
      <style type="text/css">
        *{ margin:0px; padding:0px;}
        #menu{  margin-left:20%; margin-top:20px;}
        .table { text-align:left;}
        .table tr td{ padding-left:15px; padding-top:10px;}
        .font{ color:Red; visibility:visible;}
        .borderOn{ border:solid 2px #1E90FF;}
        .borderOff{ border:1px solid #CCC;}
        .last{ margin-left:300px; }
        #reself,#cancel{ margin-left:20px;}
       label.error{ color:Red;}
       
    </style>
</head>
<body class="main">
    <div class="AllWebTopDiv">
        <div class="path">
            <div class="nav">
                <a href="#">用户修改</a>
            </div>
        </div>
        <div class="content">
        <% using (Html.BeginForm("editUser", "UserManager", FormMethod.Post, new { id = "checkForm" }))
           {%>
        <table class="table">
          <tr>
             <td>
             <label>用户编号:</label>
             <%:Html.TextBox("memberId", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'", @readonly = "readonly" })%>
          
             </td>
             <td class="style1">
             <label>会员姓名:</label>
             <%:Html.TextBox("memberName", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>       
             </td>
             <td class="style1">
             <label>卡片类型:</label>
              <%:Html.DropDownList("cardType")%>
             </td>
          </tr>
          <tr>
             <td>
             <label>卡片密码:</label>
             <%:Html.Password("pwd", null, new { onfocus = "this.className='borderOn'", onblur = "this.className='borderOff'" })%>       
             </td>
             <td>
             <label>确认密码:</label>
             <%:Html.Password("pwd1", null, new { onfocus = "this.className='borderOn'", onblur = "this.className='borderOff'" })%>       
             </td>
             <td>
             <label>手机号码:</label>
             <%:Html.TextBox("mobile", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>     
             </td>
          </tr>
          <tr>
             <td>
             <label>会员性别:</label>
              <%:Html.DropDownList("sex")%> 
             </td>
             <td>
              &nbsp;&nbsp;&nbsp;<label>Email:</label>
             <%:Html.TextBox("email", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>          
             </td>
             <td>
             <label>身份证号:</label>
             <%:Html.TextBox("numberID", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%> 
             </td>
          </tr>
          <tr>
             <td>
             <label>联系电话:</label>
              <%:Html.TextBox("tel", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>         
             </td>
             <td>
             <label>出生日期:</label>
               <%:Html.TextBox("birthday", null, new { @class = "Wdate", onclick = "WdatePicker()", onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>          
             </td>
             <td>
             <label>当前状态:</label>
             <%:Html.DropDownList("status")%>
             </td>
          </tr>
            <tr>
             <td>
             <label>截止日期:</label>
               <%:Html.TextBox("expiresDate", null, new { @class = "Wdate", onclick = "WdatePicker()", onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>   
             </td>
             <td>
             <label>登记日期:</label>
              <%:Html.TextBox("createDate", null, new { @class = "Wdate", onclick = "WdatePicker()", onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>           
             </td>
             <td>
             <label>婚姻状况:</label>
             <%:Html.DropDownList("marriage") %>
             
             </td>
          </tr>
            <tr>
             <td>
             &nbsp;&nbsp;&nbsp;&nbsp;<label class="chang">区域:</label>
                <%:Html.DropDownList("areaName")%> 
             </td>
             <td>
             <label>邮政编码:</label>
              <%:Html.TextBox("zip", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>          
             </td>
             <td>
             <label>通讯地址:</label>
              <%:Html.TextBox("address", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>    
             </td>
          </tr>
            <tr>
             <td class="style1">
             <label>会员类型:</label>
              <%:Html.TextBox("memberType", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>         
             </td>
             <td colspan="2" class="style1">
              &nbsp;&nbsp;<label>接待人:</label>
               <%:Html.TextBox("tuiguangren", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>      
             </td>
             
            </tr>
             <tr>           
             <td colspan="3">
                 &nbsp;&nbsp;&nbsp;&nbsp;<label>备注:</label> 
                  <%:Html.TextBox("memo", null, new { onblur = "this.className='borderOff'", onfocus = "this.className='borderOn'" })%>   
             </td>    
             </tr>
             <tr >
               <td class="last"></td>
               <td><input type="submit" id="sure" value="确定"   class="button2" />
               <input type="button" id="reself" value="重填" onclick="clearInput();" class="button2" /> 
              <input type="button" id="cancel" value="取消" onclick="closeWin();"  class="button2"/>
               </td>
             </tr>
        </table>
        <%} %>
         
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function () {

        $("#checkForm").validate({
            rules: {
                memberName: "required",
                mobile: {
                    required: true,
                    number: true
                },
                email: {
                    required: true,
                    email: true
                },
                pwd1: { equalTo: "#pwd" },
                birthday: "required"

            },
            messages: {
                memberName: "请输入会员号",
                mobile: {
                    required: "请输入手机号",
                    number: "请输入正确的手机号"
                },
                email: {
                    required: "请输入Email",
                    email: "请输入正确的email"
                },
                pwd1: "两次密码不一致！",
                birthday: "生日不能为空"
            },
            errorClass: "error"

        });
    });


    //清空文本框
    function clearInput() {
        var txts = document.getElementsByTagName("input");
        for (var i = 0; i < txts.length; i++) {
            if (txts[i].type == "text") {
                txts[i].value = "";
            }
        }
    }

    //取消窗口
    function closeWin() {
        var i = parent.layer.getFrameIndex();
        parent.layer.close(i);
        
    }
</script>
